<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="日期" prop="cDate">
        <el-date-picker
          v-model="queryParams.cDate"
          type="date"
          size="small"
          value-format="yyyy-MM-dd"
          @keyup.enter.native="handleQuery"
          placeholder="请输入查询日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['scrb:jscl:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['scrb:jscl:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['scrb:jscl:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['scrb:jscl:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="jsclList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="日期" align="center" prop="cDate" />
      <el-table-column label="二棒规格" align="center" prop="cJscl1bGg" />
      <el-table-column label="二棒目标作业率" align="center" prop="cJscl1bMbzyl" />
      <el-table-column label="二棒实际作业率" align="center" prop="cJscl1bSjzyl" />
      <el-table-column label="二棒负差率" align="center" prop="cJscl1bFcl" />
      <el-table-column label="二棒成材率" align="center" prop="cJscl1bCcl" />
      <el-table-column label="二棒机时产量" align="center" prop="cJscl1bJscl" />
      <el-table-column label="二棒实际温度" align="center" prop="cJscl1bSjwd" />
      <el-table-column label="二棒计划热装率" align="center" prop="cJscl1bJhrzl" />
      <el-table-column label="二棒当日热装率" align="center" prop="cJscl1bDrrzl" />
      <el-table-column label="二棒累计热装率" align="center" prop="cJscl1bLjrzl" />
      <el-table-column label="二棒钢包烘烤" align="center" prop="cJscl1bLjrzl" />
      <el-table-column label="三棒规格" align="center" prop="cJscl2bGg" />
      <el-table-column label="三棒目标作业率" align="center" prop="cJscl2bMbzyl" />
      <el-table-column label="三棒实际作业率" align="center" prop="cJscl2bSjzyl" />
      <el-table-column label="三棒负差率" align="center" prop="cJscl2bFcl" />
      <el-table-column label="三棒成材率" align="center" prop="cJscl2bCcl" />
      <el-table-column label="三棒机时产量" align="center" prop="cJscl2bJscl" />
      <el-table-column label="三棒实际温度" align="center" prop="cJscl2bSjwd" />
      <el-table-column label="三棒计划热装率" align="center" prop="cJscl2bJhrzl" />
      <el-table-column label="三棒当日热装率" align="center" prop="cJscl2bDrrzl" />
      <el-table-column label="三棒累计热装率" align="center" prop="cJscl2bLjrzl" />
      <el-table-column label="三棒钢包烘烤" align="center" prop="cJscl2bLjrzl" />
      <el-table-column label="一线规格" align="center" prop="cJscl1xGg" />
      <el-table-column label="一线目标作业率" align="center" prop="cJscl1xMbzyl" />
      <el-table-column label="一线实际作业率" align="center" prop="cJscl1xSjzyl" />
      <el-table-column label="一线负差率" align="center" prop="cJscl1xFcl" />
      <el-table-column label="一线成材率" align="center" prop="cJscl1xCcl" />
      <el-table-column label="一线机时产量" align="center" prop="cJscl1xJscl" />
      <el-table-column label="一线实际温度" align="center" prop="cJscl1xSjwd" />
      <el-table-column label="一线计划热装率" align="center" prop="cJscl1xJhrzl" />
      <el-table-column label="一线当日热装率" align="center" prop="cJscl1xDrrzl" />
      <el-table-column label="一线累计热装率" align="center" prop="cJscl1xLjrzl" />
      <el-table-column label="一线钢包烘烤" align="center" prop="cJscl1xLjrzl" />
      <el-table-column label="二线规格" align="center" prop="cJscl2xGg" />
      <el-table-column label="二线目标作业率" align="center" prop="cJscl2xMbzyl" />
      <el-table-column label="二线实际作业率" align="center" prop="cJscl2xSjzyl" />
      <el-table-column label="二线负差率" align="center" prop="cJscl2xFcl" />
      <el-table-column label="二线成材率" align="center" prop="cJscl2xCcl" />
      <el-table-column label="二线机时产量" align="center" prop="cJscl2xJscl" />
      <el-table-column label="二线实际温度" align="center" prop="cJscl2xSjwd" />
      <el-table-column label="二线计划热装率" align="center" prop="cJscl2xJhrzl" />
      <el-table-column label="二线当日热装率" align="center" prop="cJscl2xDrrzl" />
      <el-table-column label="二线累计热装率" align="center" prop="cJscl2xLjrzl" />
      <el-table-column label="二线钢包烘烤" align="center" prop="cJscl2xLjrzl" />
      <el-table-column label="中型规格" align="center" prop="cJsclZxGg" />
      <el-table-column label="中型目标作业率" align="center" prop="cJsclZxMbzyl" />
      <el-table-column label="中型实际作业率" align="center" prop="cJsclZxSjzyl" />
      <el-table-column label="中型负差率" align="center" prop="cJsclZxFcl" />
      <el-table-column label="中型成材率" align="center" prop="cJsclZxCcl" />
      <el-table-column label="中型机时产量" align="center" prop="cJsclZxJscl" />
      <el-table-column label="中型实际温度" align="center" prop="cJsclZxSjwd" />
      <el-table-column label="中型计划热装率" align="center" prop="cJsclZxJhrzl" />
      <el-table-column label="中型当日热装率" align="center" prop="cJsclZxDrrzl" />
      <el-table-column label="中型累计热装率" align="center" prop="cJsclZxLjrzl" />
      <el-table-column label="钢材合计" align="center" prop="cJsclGchj" />

      <el-table-column label="二棒电耗" align="center" prop="zfree1" />
      <el-table-column label="三棒电耗" align="center" prop="zfree2" />
      <el-table-column label="一线电耗" align="center" prop="zfree3" />
      <el-table-column label="二线电耗" align="center" prop="zfree4" />
      <el-table-column label="中型电耗" align="center" prop="zfree5" />
      <el-table-column label="二棒燃耗" align="center" prop="zfree6" />
      <el-table-column label="三棒燃耗" align="center" prop="zfree7" />
      <el-table-column label="一线燃耗" align="center" prop="zfree8" />
      <el-table-column label="二线燃耗" align="center" prop="zfree9" />
      <el-table-column label="中型燃耗" align="center" prop="zfree10" />
      <el-table-column label="二棒水耗" align="center" prop="zfree11" />
      <el-table-column label="三棒水耗" align="center" prop="zfree12" />
      <el-table-column label="一线水耗" align="center" prop="zfree13" />
      <el-table-column label="二线水耗" align="center" prop="zfree14" />
      <el-table-column label="中型水耗" align="center" prop="zfree15" />

      <el-table-column label="备注" align="center" prop="remake" />
      <el-table-column label="删除标志" align="center" prop="cState" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['scrb:jscl:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['scrb:jscl:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改金属材料公司生产日报录入对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="日期" prop="cDate" >
          <el-date-picker
            v-model="form.cDate"
            :disabled=!isInsert
            type="date"
            size="small"
            value-format="yyyy-MM-dd"
            placeholder="请输入日期">
          </el-date-picker>
        </el-form-item>


        <table>
          <caption>生产数据</caption>
          <tr>
            <td width="80px"></td>
            <td>规格</td>
            <td>订单执行率</td>
            <td>作业率</td>
            <td>成材率(目标)</td>
            <td>成材率(实际)</td>
            <td>机时产量</td>
            <td>实际温度</td>
            <td>热装率计划</td>
            <td>热装率当日</td>
            <td>热装率累计</td>
          </tr>
          <tr>
            <td>二棒</td>
            <td><el-input v-model="form.cJscl1bGg" placeholder="请输入一棒规格" /></td>
            <td><el-input v-model="form.cJscl1bMbzyl" placeholder="请输入一棒订单执行率" /></td>
            <td><el-input v-model="form.cJscl1bSjzyl" placeholder="请输入一棒作业率" /></td>
            <td><el-input v-model="form.cJscl1bFcl" placeholder="请输入一棒成材率(目标)" /></td>
            <td><el-input v-model="form.cJscl1bCcl" placeholder="请输入一棒成材率(实际)" /></td>
            <td><el-input v-model="form.cJscl1bJscl" placeholder="请输入一棒机时产量" /></td>
            <td><el-input v-model="form.cJscl1bSjwd" placeholder="请输入一棒实际温度" /></td>
            <td><el-input v-model="form.cJscl1bJhrzl" placeholder="请输入一棒热装率计划" /></td>
            <td><el-input v-model="form.cJscl1bDrrzl" placeholder="请输入一棒热装率当日" /></td>
            <td><el-input v-model="form.cJscl1bLjrzl" placeholder="请输入一棒热装率累计" /></td>
          </tr>
          <tr>
            <td>三棒</td>
            <td><el-input v-model="form.cJscl2bGg" placeholder="请输入二棒规格" /></td>
            <td><el-input v-model="form.cJscl2bMbzyl" placeholder="请输入二棒订单执行率" /></td>
            <td><el-input v-model="form.cJscl2bSjzyl" placeholder="请输入二棒作业率" /></td>
            <td><el-input v-model="form.cJscl2bFcl" placeholder="请输入二棒负差率" /></td>
            <td><el-input v-model="form.cJscl2bCcl" placeholder="请输入二棒成材率" /></td>
            <td><el-input v-model="form.cJscl2bJscl" placeholder="请输入二棒机时产量" /></td>
            <td><el-input v-model="form.cJscl2bSjwd" placeholder="请输入二棒实际温度" /></td>
            <td><el-input v-model="form.cJscl2bJhrzl" placeholder="请输入二棒热装率计划" /></td>
            <td><el-input v-model="form.cJscl2bDrrzl" placeholder="请输入二棒热装率当日" /></td>
            <td><el-input v-model="form.cJscl2bLjrzl" placeholder="请输入二棒热装率累计" /></td>
          </tr>
          <tr>
            <td>大棒</td>
            <td><el-input v-model="form.cJscl1xGg" placeholder="请输入一线规格" /></td>
            <td><el-input v-model="form.cJscl1xMbzyl" placeholder="请输入一线作业率目标" /></td>
            <td><el-input v-model="form.cJscl1xSjzyl" placeholder="请输入一线作业率实际" /></td>
            <td><el-input v-model="form.cJscl1xFcl" placeholder="请输入一线负差率" /></td>
            <td><el-input v-model="form.cJscl1xCcl" placeholder="请输入一线成材率" /></td>
            <td><el-input v-model="form.cJscl1xJscl" placeholder="请输入一线机时产量" /></td>
            <td><el-input v-model="form.cJscl1xSjwd" placeholder="请输入一线实际温度" /></td>
            <td><el-input v-model="form.cJscl1xJhrzl" placeholder="请输入一线热装率计划" /></td>
            <td><el-input v-model="form.cJscl1xDrrzl" placeholder="请输入一线热装率当日" /></td>
            <td><el-input v-model="form.cJscl1xLjrzl" placeholder="请输入一线热装率累计" /></td>
          </tr>
          <tr>
            <td>中型</td>
            <td><el-input v-model="form.cJsclZxGg" placeholder="请输入中型规格" /></td>
            <td><el-input v-model="form.cJsclZxMbzyl" placeholder="请输入中型订单执行率" /></td>
            <td><el-input v-model="form.cJsclZxSjzyl" placeholder="请输入中型作业率" /></td>
            <td><el-input v-model="form.cJsclZxFcl" placeholder="请输入中型负差率" /></td>
            <td><el-input v-model="form.cJsclZxCcl" placeholder="请输入中型成材率" /></td>
            <td><el-input v-model="form.cJsclZxJscl" placeholder="请输入中型机时产量" /></td>
            <td><el-input v-model="form.cJsclZxSjwd" placeholder="请输入中型实际温度" /></td>
            <td><el-input v-model="form.cJsclZxJhrzl" placeholder="请输入中型热装率计划" /></td>
            <td><el-input v-model="form.cJsclZxDrrzl" placeholder="请输入中型热装率当日" /></td>
            <td><el-input v-model="form.cJsclZxLjrzl" placeholder="请输入中型热装率累计" /></td>
          </tr>
          <tr>
            <td>二线</td>
            <td><el-input v-model="form.cJscl2xGg" placeholder="请输入二线规格" /></td>
            <td><el-input v-model="form.cJscl2xMbzyl" placeholder="请输入二线订单执行率" /></td>
            <td><el-input v-model="form.cJscl2xSjzyl" placeholder="请输入二线作业率"/></td>
            <td><el-input v-model="form.cJscl2xFcl" placeholder="请输入二线负差率" /></td>
            <td><el-input v-model="form.cJscl2xCcl" placeholder="请输入二线成材率" /></td>
            <td><el-input v-model="form.cJscl2xJscl" placeholder="请输入二线机时产量" /></td>
            <td><el-input v-model="form.cJscl2xSjwd" placeholder="请输入二线实际温度" /></td>
            <td><el-input v-model="form.cJscl2xJhrzl" placeholder="请输入二线热装率计划" /></td>
            <td><el-input v-model="form.cJscl2xDrrzl" placeholder="请输入二线热装率当日" /></td>
            <td><el-input v-model="form.cJscl2xLjrzl" placeholder="请输入一线热装率累计" /></td>
          </tr>
        </table>
        <table>
          <caption>能源单耗</caption>
          <tr>
            <td width="80px"></td>
            <td>二棒</td>
            <td>三棒</td>
            <td>大棒</td>
            <td>中型</td>
            <td>二线</td>
          </tr>
          <tr>
            <td>电耗</td>
            <td><el-input v-model="form.zfree1" placeholder="请输入二棒电耗" /></td>
            <td><el-input v-model="form.zfree2" placeholder="请输入三棒电耗" /></td>
            <td><el-input v-model="form.zfree3" placeholder="请输入大棒电耗" /></td>
            <td><el-input v-model="form.zfree5" placeholder="请输入中型电耗" /></td>
            <td><el-input v-model="form.zfree4" placeholder="请输入二线电耗" /></td>
          </tr>
          <tr>
            <td>燃耗</td>
            <td><el-input v-model="form.zfree6" placeholder="请输入二棒燃耗" /></td>
            <td><el-input v-model="form.zfree7" placeholder="请输入三棒燃耗" /></td>
            <td><el-input v-model="form.zfree8" placeholder="请输入大棒燃耗" /></td>
            <td><el-input v-model="form.zfree10" placeholder="请输入中型燃耗" /></td>
            <td><el-input v-model="form.zfree9" placeholder="请输入二线燃耗" /></td>
          </tr>
          <tr>
            <td>水耗</td>
            <td><el-input v-model="form.zfree11" placeholder="请输入二棒水耗" /></td>
            <td><el-input v-model="form.zfree12" placeholder="请输入三棒水耗" /></td>
            <td><el-input v-model="form.zfree13" placeholder="请输入大棒水耗" /></td>
            <td><el-input v-model="form.zfree15" placeholder="请输入中型水耗" /></td>
            <td><el-input v-model="form.zfree14" placeholder="请输入二线水耗" /></td>
          </tr>
        </table>

        <!--<el-form-item label="一棒规格" prop="cJscl1bGg">-->
          <!--<el-input v-model="form.cJscl1bGg" placeholder="请输入一棒规格" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒目标作业率" prop="cJscl1bMbzyl">-->
          <!--<el-input v-model="form.cJscl1bMbzyl" placeholder="请输入一棒目标作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒实际作业率" prop="cJscl1bSjzyl">-->
          <!--<el-input v-model="form.cJscl1bSjzyl" placeholder="请输入一棒实际作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒负差率" prop="cJscl1bFcl">-->
          <!--<el-input v-model="form.cJscl1bFcl" placeholder="请输入一棒负差率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒成材率" prop="cJscl1bCcl">-->
          <!--<el-input v-model="form.cJscl1bCcl" placeholder="请输入一棒成材率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒机时产量" prop="cJscl1bJscl">-->
          <!--<el-input v-model="form.cJscl1bJscl" placeholder="请输入一棒机时产量" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒实际温度" prop="cJscl1bSjwd">-->
          <!--<el-input v-model="form.cJscl1bSjwd" placeholder="请输入一棒实际温度" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒计划热装率" prop="cJscl1bJhrzl">-->
          <!--<el-input v-model="form.cJscl1bJhrzl" placeholder="请输入一棒计划热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒当日热装率" prop="cJscl1bDrrzl">-->
          <!--<el-input v-model="form.cJscl1bDrrzl" placeholder="请输入一棒当日热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一棒累计热装率" prop="cJscl1bLjrzl">-->
          <!--<el-input v-model="form.cJscl1bLjrzl" placeholder="请输入一棒累计热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒规格" prop="cJscl2bGg">-->
          <!--<el-input v-model="form.cJscl2bGg" placeholder="请输入二棒规格" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒目标作业率" prop="cJscl2bMbzyl">-->
          <!--<el-input v-model="form.cJscl2bMbzyl" placeholder="请输入二棒目标作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒实际作业率" prop="cJscl2bSjzyl">-->
          <!--<el-input v-model="form.cJscl2bSjzyl" placeholder="请输入二棒实际作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒负差率" prop="cJscl2bFcl">-->
          <!--<el-input v-model="form.cJscl2bFcl" placeholder="请输入二棒负差率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒成材率" prop="cJscl2bCcl">-->
          <!--<el-input v-model="form.cJscl2bCcl" placeholder="请输入二棒成材率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒机时产量" prop="cJscl2bJscl">-->
          <!--<el-input v-model="form.cJscl2bJscl" placeholder="请输入二棒机时产量" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒实际温度" prop="cJscl2bSjwd">-->
          <!--<el-input v-model="form.cJscl2bSjwd" placeholder="请输入二棒实际温度" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒计划热装率" prop="cJscl2bJhrzl">-->
          <!--<el-input v-model="form.cJscl2bJhrzl" placeholder="请输入二棒计划热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒当日热装率" prop="cJscl2bDrrzl">-->
          <!--<el-input v-model="form.cJscl2bDrrzl" placeholder="请输入二棒当日热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二棒累计热装率" prop="cJscl2bLjrzl">-->
          <!--<el-input v-model="form.cJscl2bLjrzl" placeholder="请输入二棒累计热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线规格" prop="cJscl1xGg">-->
          <!--<el-input v-model="form.cJscl1xGg" placeholder="请输入一线规格" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线目标作业率" prop="cJscl1xMbzyl">-->
          <!--<el-input v-model="form.cJscl1xMbzyl" placeholder="请输入一线目标作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线实际作业率" prop="cJscl1xSjzyl">-->
          <!--<el-input v-model="form.cJscl1xSjzyl" placeholder="请输入一线实际作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线负差率" prop="cJscl1xFcl">-->
          <!--<el-input v-model="form.cJscl1xFcl" placeholder="请输入一线负差率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线成材率" prop="cJscl1xCcl">-->
          <!--<el-input v-model="form.cJscl1xCcl" placeholder="请输入一线成材率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线机时产量" prop="cJscl1xJscl">-->
          <!--<el-input v-model="form.cJscl1xJscl" placeholder="请输入一线机时产量" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线实际温度" prop="cJscl1xSjwd">-->
          <!--<el-input v-model="form.cJscl1xSjwd" placeholder="请输入一线实际温度" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线计划热装率" prop="cJscl1xJhrzl">-->
          <!--<el-input v-model="form.cJscl1xJhrzl" placeholder="请输入一线计划热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线当日热装率" prop="cJscl1xDrrzl">-->
          <!--<el-input v-model="form.cJscl1xDrrzl" placeholder="请输入一线当日热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="一线累计热装率" prop="cJscl1xLjrzl">-->
          <!--<el-input v-model="form.cJscl1xLjrzl" placeholder="请输入一线累计热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线规格" prop="cJscl2xGg">-->
          <!--<el-input v-model="form.cJscl2xGg" placeholder="请输入二线规格" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线目标作业率" prop="cJscl2xMbzyl">-->
          <!--<el-input v-model="form.cJscl2xMbzyl" placeholder="请输入二线目标作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线实际作业率" prop="cJscl2xSjzyl">-->
          <!--<el-input v-model="form.cJscl2xSjzyl" placeholder="请输入二线实际作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线负差率" prop="cJscl2xFcl">-->
          <!--<el-input v-model="form.cJscl2xFcl" placeholder="请输入二线负差率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线成材率" prop="cJscl2xCcl">-->
          <!--<el-input v-model="form.cJscl2xCcl" placeholder="请输入二线成材率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线机时产量" prop="cJscl2xJscl">-->
          <!--<el-input v-model="form.cJscl2xJscl" placeholder="请输入二线机时产量" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线实际温度" prop="cJscl2xSjwd">-->
          <!--<el-input v-model="form.cJscl2xSjwd" placeholder="请输入二线实际温度" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线计划热装率" prop="cJscl2xJhrzl">-->
          <!--<el-input v-model="form.cJscl2xJhrzl" placeholder="请输入二线计划热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线当日热装率" prop="cJscl2xDrrzl">-->
          <!--<el-input v-model="form.cJscl2xDrrzl" placeholder="请输入二线当日热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="二线累计热装率" prop="cJscl2xLjrzl">-->
          <!--<el-input v-model="form.cJscl2xLjrzl" placeholder="请输入二线累计热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型规格" prop="cJsclZxGg">-->
          <!--<el-input v-model="form.cJsclZxGg" placeholder="请输入中型规格" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型目标作业率" prop="cJsclZxMbzyl">-->
          <!--<el-input v-model="form.cJsclZxMbzyl" placeholder="请输入中型目标作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型实际作业率" prop="cJsclZxSjzyl">-->
          <!--<el-input v-model="form.cJsclZxSjzyl" placeholder="请输入中型实际作业率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型负差率" prop="cJsclZxFcl">-->
          <!--<el-input v-model="form.cJsclZxFcl" placeholder="请输入中型负差率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型成材率" prop="cJsclZxCcl">-->
          <!--<el-input v-model="form.cJsclZxCcl" placeholder="请输入中型成材率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型机时产量" prop="cJsclZxJscl">-->
          <!--<el-input v-model="form.cJsclZxJscl" placeholder="请输入中型机时产量" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型实际温度" prop="cJsclZxSjwd">-->
          <!--<el-input v-model="form.cJsclZxSjwd" placeholder="请输入中型实际温度" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型计划热装率" prop="cJsclZxJhrzl">-->
          <!--<el-input v-model="form.cJsclZxJhrzl" placeholder="请输入中型计划热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型当日热装率" prop="cJsclZxDrrzl">-->
          <!--<el-input v-model="form.cJsclZxDrrzl" placeholder="请输入中型当日热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="中型累计热装率" prop="cJsclZxLjrzl">-->
          <!--<el-input v-model="form.cJsclZxLjrzl" placeholder="请输入中型累计热装率" />-->
        <!--</el-form-item>-->
        <!--<el-form-item label="钢材合计" prop="cJsclGchj">-->
          <!--<el-input v-model="form.cJsclGchj" placeholder="请输入钢材合计" />-->
        <!--</el-form-item>-->
        <el-form-item label="备注" prop="remake">
          <el-input v-model="form.remake" placeholder="请输入备注" />
        </el-form-item>
        <!--<el-form-item label="删除标志" prop="cState">-->
          <!--<el-input v-model="form.cState" placeholder="请输入删除标志" />-->
        <!--</el-form-item>-->
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listJscl, getJscl, delJscl, addJscl, updateJscl } from "@/api/scrb/jscl";

export default {
  name: "Jscl",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 金属材料公司生产日报录入表格数据
      jsclList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        cJscl1bGg: null,
        cJscl1bMbzyl: null,
        cJscl1bSjzyl: null,
        cJscl1bFcl: null,
        cJscl1bCcl: null,
        cJscl1bJscl: null,
        cJscl1bSjwd: null,
        cJscl1bJhrzl: null,
        cJscl1bDrrzl: null,
        cJscl1bLjrzl: null,
        cJscl2bGg: null,
        cJscl2bMbzyl: null,
        cJscl2bSjzyl: null,
        cJscl2bFcl: null,
        cJscl2bCcl: null,
        cJscl2bJscl: null,
        cJscl2bSjwd: null,
        cJscl2bJhrzl: null,
        cJscl2bDrrzl: null,
        cJscl2bLjrzl: null,
        cJscl1xGg: null,
        cJscl1xMbzyl: null,
        cJscl1xSjzyl: null,
        cJscl1xFcl: null,
        cJscl1xCcl: null,
        cJscl1xJscl: null,
        cJscl1xSjwd: null,
        cJscl1xJhrzl: null,
        cJscl1xDrrzl: null,
        cJscl1xLjrzl: null,
        cJscl2xGg: null,
        cJscl2xMbzyl: null,
        cJscl2xSjzyl: null,
        cJscl2xFcl: null,
        cJscl2xCcl: null,
        cJscl2xJscl: null,
        cJscl2xSjwd: null,
        cJscl2xJhrzl: null,
        cJscl2xDrrzl: null,
        cJscl2xLjrzl: null,
        cJsclZxGg: null,
        cJsclZxMbzyl: null,
        cJsclZxSjzyl: null,
        cJsclZxFcl: null,
        cJsclZxCcl: null,
        cJsclZxJscl: null,
        cJsclZxSjwd: null,
        cJsclZxJhrzl: null,
        cJsclZxDrrzl: null,
        cJsclZxLjrzl: null,
        cJsclGchj: null,
        remake: null,
        zfree1: null,
        zfree2: null,
        zfree3: null,
        zfree4: null,
        zfree5: null,
        zfree6: null,
        zfree7: null,
        zfree8: null,
        zfree9: null,
        zfree10: null,
        zfree11: null,
        zfree12: null,
        zfree13: null,
        zfree14: null,
        zfree15: null,
        cState: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      },
      isInsert:true,
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询金属材料公司生产日报录入列表 */
    getList() {
      this.loading = true;
      listJscl(this.queryParams).then(response => {
        this.jsclList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        cDate: null,
        cJscl1bGg: null,
        cJscl1bMbzyl: null,
        cJscl1bSjzyl: null,
        cJscl1bFcl: null,
        cJscl1bCcl: null,
        cJscl1bJscl: null,
        cJscl1bSjwd: null,
        cJscl1bJhrzl: null,
        cJscl1bDrrzl: null,
        cJscl1bLjrzl: null,
        cJscl2bGg: null,
        cJscl2bMbzyl: null,
        cJscl2bSjzyl: null,
        cJscl2bFcl: null,
        cJscl2bCcl: null,
        cJscl2bJscl: null,
        cJscl2bSjwd: null,
        cJscl2bJhrzl: null,
        cJscl2bDrrzl: null,
        cJscl2bLjrzl: null,
        cJscl1xGg: null,
        cJscl1xMbzyl: null,
        cJscl1xSjzyl: null,
        cJscl1xFcl: null,
        cJscl1xCcl: null,
        cJscl1xJscl: null,
        cJscl1xSjwd: null,
        cJscl1xJhrzl: null,
        cJscl1xDrrzl: null,
        cJscl1xLjrzl: null,
        cJscl2xGg: null,
        cJscl2xMbzyl: null,
        cJscl2xSjzyl: null,
        cJscl2xFcl: null,
        cJscl2xCcl: null,
        cJscl2xJscl: null,
        cJscl2xSjwd: null,
        cJscl2xJhrzl: null,
        cJscl2xDrrzl: null,
        cJscl2xLjrzl: null,
        cJsclZxGg: null,
        cJsclZxMbzyl: null,
        cJsclZxSjzyl: null,
        cJsclZxFcl: null,
        cJsclZxCcl: null,
        cJsclZxJscl: null,
        cJsclZxSjwd: null,
        cJsclZxJhrzl: null,
        cJsclZxDrrzl: null,
        cJsclZxLjrzl: null,
        cJsclGchj: null,
        remake: null,
        zfree1: null,
        zfree2: null,
        zfree3: null,
        zfree4: null,
        zfree5: null,
        zfree6: null,
        zfree7: null,
        zfree8: null,
        zfree9: null,
        zfree10: null,
        zfree11: null,
        zfree12: null,
        zfree13: null,
        zfree14: null,
        zfree15: null,
        cState: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.cDate)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.isInsert=true;
      this.title = "添加金属材料公司生产日报录入";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      this.isInsert=false;
      const cDate = row.cDate || this.ids
      getJscl(cDate).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改金属材料公司生产日报录入";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (!this.isInsert) {
            updateJscl(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addJscl(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const cDates = row.cDate || this.ids;
      this.$modal.confirm('是否确认删除金属材料公司生产日报录入编号为"' + cDates + '"的数据项？').then(function() {
        return delJscl(cDates);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('scrb/jscl/export', {
        ...this.queryParams
      }, `jscl_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
<style lang="scss" scoped>
  table
  {
    border-collapse: collapse;
    margin: 0 auto;
    text-align: center;
  }
  table td, table th
  {
    border: 1px solid #cad9ea;
    color: #666;
    height: 30px;
  }
  table thead th
  {
    background-color: #CCE8EB;
    width: 100px;
  }
  table tr:nth-child(odd)
  {
    background: #fff;
  }
  table tr:nth-child(even)
  {
    background: #F5FAFA;
  }
</style>


